package com.pactera.madp.admin.api.feign;

import com.pactera.madp.admin.api.entity.SysDept;
import com.pactera.madp.common.core.constant.ServiceNameConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @File name：com.pactera.madp.admin.api.feign.RemoteDeptService
 * @Create on：2022/5/17
 * @Author：tianq
 */
@FeignClient(contextId = "remoteDeptAdminService", value = ServiceNameConstants.UPMS_SERVICE)
public interface RemoteDeptAdminService {

    @GetMapping("/dept/dept-by-id")
    List<SysDept> getDeptListById(@RequestParam("ids") List<Integer> ids);

    @GetMapping("/dept/dept-by")
    SysDept getDeptListBy(@RequestParam("id") Integer id);

//    @PostMapping("/dept/lower-list")
//    List<SysDept> getLowerDeptsByList(@RequestParam("deptIds") List<Integer> deptIds);

    @PostMapping("/dept/lower-list")
    List<SysDept> getLowerDeptsByList(@RequestBody List<Integer> deptIds);

}
